<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'/>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<link href="css/base.css" rel="stylesheet" type="text/css" media="screen" />
<script src="js/jquery-1.11.0.min.js" type="text/javascript" ></script>
<script src="js/common.js" type="text/javascript" ></script>

<title>小展Story</title>

</head>
<body>

<div id="orientLayer" class="mod-orient-layer">
	   <div class="mod-orient-layer__content">
	       <i class="icon mod-orient-layer__icon-orient"></i>
	       <div class="mod-orient-layer__desc">为了更好的体验，请使用竖屏浏览</div>
	   </div>
</div>

<div class="showCases">
<h3><font id="title"></font>
	<span id="publishTime"></span>
</h3>
<div class="casesPic"><img src="images/logo.gif"></div>
<div class="casesInfo" id="detail">

</div>

<div class="casesPic"><img src="images/code.gif"></div>
<div class="ops" id="footer">

</div>

</div>


<script type="text/javascript">
	var id=getQueryString("id");
	
	$.ajax({
		type:"post",
		url:basePath+"/notice/detail",
		data:"id="+id,
		success:function(data){
			if(data.flag){
				var obj=data.data;
				$("#title").html(obj.title);
				if(obj.publishTime){
					obj.publishTime=obj.publishTime.replace("00:00:00","");
				}
				
				$("#publishTime").html(obj.publishTime);
				$("#detail").html(obj.content);
				
				var footer="";
				if(obj.href!=""&&obj.href!=null&&obj.href!="null"&&obj.href!=undefined){
					footer+="<a href=\""+obj.href+"\" class=\"read\">阅读原文</a>";
				}
				footer+="阅读 "+obj.readCount+"";
				footer+="<span class=\"zan\" onclick='zan();'>"+obj.praiseCount+"</span>";
				$("#footer").html(footer);
			}
		}
	});
	
	function zan(){
		$.ajax({
			type:"post",
			url:basePath+"/notice/zan",
			data:"id="+id,
			success:function(data){
				if(data.flag){
					var obj=data.data;
					$(".zan").text(obj.praiseCount);
				}
			}
		});
	}
</script>
</body>
</html>